<h1>Wpisz się do księgi gości</h1>
<p class="info blue-box"><?php echo $this->Html->link("Wróć do listy wpisów", array('action' => 'index')); ?></p>
<?php
echo $this->Form->create('GuestbookEntry', array(
    'inputDefaults' => array(
        'label' => false,
        'div' => false
    ),
    'url' => array('controller' => 'guestbook', 'action' => 'create')
));

if($authorized) {
    echo("<p>Twój nick, to: ".$authorizedUser['username'].".</p>");
    echo $this->Form->hidden('guest', array('value' => '0'));
    echo $this->Form->hidden('user_id', array('value' => $authorizedUser['id']));
}
else {
    echo("<p>Twój nick: ".$this->Form->input('nick')."</p>");
    echo $this->Form->hidden('guest', array('value' => '1'));
}
echo $this->Form->input('content', array('rows' => '3'));
echo $this->Form->end('Zapisz');
?>